<!--
 
 This file is part of EspGrid.  EspGrid is (c) 2012,2013 by David Ogborn.
 
 EspGrid is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.
 
 EspGrid is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with EspGrid.  If not, see <http://www.gnu.org/licenses/>.
 
 -->

<html>
    <head>
        <title>EspGrid</title>
    </head>
<body>

    <h1>Architecture</h1>
    
    <div>Every machine in an ensemble runs the EspGrid application.  The instances of EspGrid all communicate with each other, automatically and behind the scenes.  Performers (for example, live coding performers) don't send information directly to other performers/computers.  Instead, they send information to their local EspGrid application - and it works out the details of how to get that information to everyone else "on the grid". This approach (no direct communication with other performers/computers) has several advantages:</div>
    
    <div>
        <ul>
            <li>The behind the scenes protocol can employ sophisticated techniques to improve reliability, timing, etc</li>
            <li>The behind the scenes protocol can change and improve with out disturbance to ongoing performance and composition practices</li>
            <li>The focus of creators and performers can stay on the content of shared information rather than the mode of transmission</li>
            <li>The behind the scenes protocol can evolve to span multiple networks (and the Internet) with little to no change to the interface used by creators/performers for everyday ensemble work</li>
        </ul>
    </div>
    
    <div>When events happen that need to be shared with "local" applications (for example, ChucK or Max running on an individual performer's machine) the grid sends an OSC message to a designated port on that machine.  By convention, the ports are as follows:
        <ul>
            <li>Max - port 5511</li>
            <li>ChucK - port 5512</li>
            <li>SuperCollider - port 57120</li>
            <li>PD - port 5513</li>
        </ul>
        </div>
    
    <div>This allows different applications to be used by different members of the ensemble, or even multiple applications to be used simultaneously on a given machine.  Both situations are quite common in laptop orchestras!  For complete flexibility, additional ports (and also addresses other than the local address) can be set as the target for messages from the grid.  Of course, if a particular environment is in heavy use by EspGrid users, we should add that as a standard option (let us know!)!</div>
    
    <div>In practice, performers don't work directly with the OSC messages that the grid sends to the applications.  Instead, they use one of a series of "thin helper objects" to connect the shared data to convenient practices/affordances in the performance environment of their choice.  For example, the esp.ck file receives the OSC beat messages sent by the grid, and makes that available to ChucK coders in a way that respects ChucK programming practices/conventions.</div>
    
</body>
</html>
